import React, { Component } from 'react'
import './index.css'
import MyNav from '../../components/nav'
import { Route, Redirect } from 'react-router-dom'
import Home from '../home'
import About from '../about'

export default class app extends Component {0
  render(){
    return (
      <div className="container">
        <div className="header">欢迎来到彭举的世界</div>
        <div className="  content">
          <div className="nav">
            <MyNav to="/home">home</MyNav>
            <MyNav to="/about">about</MyNav>
          </div>
          <div className="show">
            <Route path="/home" component={Home}></Route>
            <Route path="/about" component={About}></Route>
            <Redirect to="/home" component={ Home } />
          </div>
        </div>
      </div>
    )
  }
}
